export const state = () => ({
  city: ""
});

export const mutations = {
  saveCity(state, data) {
    state.city = data;
  }
};

export const actions = {
  // 获取城市相关信息
  asyncGetCityData(context,city) {
    return this.$axios.get("cities", {
      params: {
        name: city
      }
    });
  },
  // 异步获取当前酒店位置
  asyncGetCurrentHotelmsg(context,hotelId) {
    return this.$axios({
      url: "/hotels",
      params: { id: hotelId }
    });
  }
};
